package com.ybkj.chat.module.login.activity;

import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.ybkj.chat.R;
import com.ybkj.chat.base.BaseMvpActivity;
import com.ybkj.chat.manager.ActivityManager;
import com.ybkj.chat.module.login.presenter.IntoLoginPresenter;
import com.ybkj.chat.module.login.view.IntoLoginView;
import com.ybkj.chat.ui.view.ClearEditText;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * author : ywh
 * date : 2019/2/5 12:39
 * description :进入登录页面
 */
public class IntoLoginActivity extends BaseMvpActivity<IntoLoginPresenter> implements IntoLoginView {
    //手机号输入框
    @BindView(R.id.et_account)
    ClearEditText etAccount;
    //登录密码
    @BindView(R.id.et_password)
    ClearEditText etPassWord;
    //手机号登录
    @BindView(R.id.phone_code_login)
    TextView phoneCodeLogin;
    //忘记密码
    @BindView(R.id.forget_password)
    TextView forgetPassword;
    //登录
    @BindView(R.id.login_btn)
    Button loginBtn;
    //微信登录
    @BindView(R.id.wechat_login)
    ImageView wechatLogin;
    //qq登录
    @BindView(R.id.qq_login)
    ImageView qqLogin;

    @Override
    protected void injectPresenter() {
        getActivityComponent().inject(this);
    }

    @Override
    protected void initTitle() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.layout_into_login;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.phone_code_login, R.id.forget_password, R.id.login_btn, R.id.wechat_login, R.id.qq_login})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            //手机验证码登录
            case R.id.phone_code_login:
                ActivityManager.gotoActivity(mContext, PhoneCodeLoginActivity.class);
                break;
            //忘记密码
            case R.id.forget_password:
                ActivityManager.gotoActivity(mContext, ForgetPasswordActivity.class);
                break;
            //登录
            case R.id.login_btn:

//                ActivityManager.gotoActivity(mContext, MainActivity.class);
                break;
            //微信登录
            case R.id.wechat_login:
                break;
            //QQ登陆
            case R.id.qq_login:
                break;
        }
    }

    @Override
    public boolean isImmersiveStatusBar() {
        return true;
    }
}
